/**
 * Jaxson ajax
 *
 * Copyright Remedy Interactive, licensed under Apache version 2 license:
 *
 *  http://www.apache.org/licenses/LICENSE-2.0.html
 *
 * This notice must remain in all java source files.
 */
package org.jaxson.struts.charts;

import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.Plot;
import org.jfree.data.general.Dataset;

/**
 * Base class for creating a renderer for new types
 * of charts.
 * 
 * @author Joe Maisel
 *
 */
public abstract class AbstractChartRenderer
{
	/**
	 * Renders a JFreeChart.
	 */
	public abstract JFreeChart render( Dataset dataset, ChartFormat format );
	
	private IPlotHandler plotHandler = new IPlotHandler()
	{
		@Override
		public void handle( Plot plot ){}
	};
	
	/**
	 * @return the plotHandler
	 */
	public IPlotHandler getPlotHandler()
	{
		return plotHandler;
	}
	
	/**
	 * @param plotHandler the plotHandler to set
	 */
	public void setPlotHandler( IPlotHandler plotHandler )
	{
		this.plotHandler = plotHandler;
	}
}
